Fix Tramp's file-attributes cache
authorMichael Albinus <michael.albinus@gmx.de>
Tue, 1 Apr 2025 13:24:44 +0000 (15:24 +0200)
committerMichael Albinus <michael.albinus@gmx.de>
Tue, 1 Apr 2025 13:24:44 +0000 (15:24 +0200)
commit3f9ac99fc7e024678dff1ac3ff38e617ef2606fe
tree10522887786bdf3081c62679d7ab190ef3425310
parent6cac92928a99a2cf33aeeeddf295cf981750391c
Fix Tramp's file-attributes cache

* lisp/net/tramp-adb.el (tramp-adb-handle-file-executable-p):
Check also for sticky bit.
(tramp-adb-handle-file-readable-p): Simplify.

* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-executable-p):
Check also for sticky bit.  Force `file-attributes' check.

* lisp/net/tramp-sh.el (tramp-sh-handle-file-executable-p):
Check also for sticky bit.
(tramp-sh-handle-file-readable-p)
(tramp-sh-handle-file-writable-p): Simplify.

* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-executable-p):
Check also for sticky bit.
(tramp-sudoedit-handle-file-readable-p)
(tramp-sudoedit-handle-file-writable-p): Simplify.

* lisp/net/tramp.el (tramp-use-file-attributes): Fix docstring.
(tramp-handle-file-readable-p, tramp-handle-file-writable-p):
Force `file-attributes' check.  Use `file-truename' for symbolic links.
(tramp-check-cached-permissions): New optional argument FORCE.
Fix symlink check.  Check also for sticky bit.  (Bug#77402)

* test/lisp/net/tramp-tests.el
(tramp-test20-file-modes-without-file-attributes)
(tramp-test21-file-links-without-file-attributes): New tests.
lisp/net/tramp-adb.el
lisp/net/tramp-gvfs.el
lisp/net/tramp-sh.el
lisp/net/tramp-sudoedit.el
lisp/net/tramp.el
test/lisp/net/tramp-tests.el